<template>
  <el-container>
  <el-header>登陆界面</el-header>
  <el-main>
    <el-form status-icon label-width="50px" class="demo-ruleForm">
      <el-form-item label="帐号" prop="userid">
        <el-input v-model="users.userid"></el-input>
      </el-form-item>
      <el-form-item label="密码" prop="password">
        <el-input type="password" v-model="users.password" autocomplete="off"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="login">登陆</el-button>
        <el-button @click="goregister">注册</el-button>
      </el-form-item>
    </el-form>
  </el-main>
</el-container>
</template>

<script>
export default {
    data() {
      return {
        users: {
          userid: '',
          password: ''
        },

    }
  },
    methods: {
      login(){
        this.$router.push({path:'/Index'});
      },
      goregister(){
        this.$router.push({path:'/Register'});
      }
    }
}
</script>

<style>
  *{padding: 0;margin: 0;}
  .el-header{
    text-align: center;
  }
  .el-main{
    text-align: center;
  }
</style>